<?
require("enroll_config.php");

$location_status .= "| Delete";
$show_backnav = "enroll_menu";
$menuname = NULL;
$menutarget = NULL;

if (NULL!=$action){

	$Query = "DELETE FROM $table WHERE id=$id";
	myQuery($Query);

   header("location:" . $rela_path . "share/msg.php?v=74&aid=$aid");

   exit();

}else{

  if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");

	exit();
  
  }

}


$Query = "SELECT 
id,
code,
first_name,
last_name,
position,
company,
c_address,
p_address,
email,
o_phone,
m_phone,
h_phone,
aid,
date,
status
FROM $table WHERE id=$id LIMIT 1";

$r=myQuery($Query);

$code=$r[0][1];
$first_name=$r[0][2];
$last_name=$r[0][3];
$position=$r[0][4];
$company=$r[0][5];
$c_address=$r[0][6];
$p_address=$r[0][7];
$email=$r[0][8];
$o_phone=$r[0][9];
$m_phone=$r[0][10];
$h_phone=$r[0][11];
$aid=$r[0][12];
$date=$r[0][13];
$status=$r[0][14];

require($rela_path . "inc/header.php");

?>
<form action="" method="post" enctype="multipart/form-data" name="form1">
<input name="action" type="hidden" value="delete">
<input name="email" type="hidden" value="<?print($email)?>">
<input name="id" type="hidden" value="<?print($id)?>">





<table width="95%" border="0" align="center">
  <tr> 
      <td valign="top"> <p><br>
          <br>
          Are you sure to delete this Acuity Evening Subscriber ? 
          <input type="submit" class="button" name="Submit2" value="  Yes  ">
          <input type="button" class="button" name="Submit3" value="  No  " onClick="Redirect('enroll_menu.php',1);">
          <br>
          <br>

<table>

        <tr> 
          <td class="tdheader">Code :</td>
          <td><?print($code)?>
					<input name="aid" type="hidden" value="<?print($aid)?>">
<input name="id" type="hidden" value="<?print($id)?>">

					
					</td>
        </tr>

          <tr>
            <td class="tdheader">Date:</td>
            <td><?print($date)?></td>
          </tr>
          <tr>
            <td class="tdheader">Acuity Evening: </td>
            <td><?



$Query = "select presented from med_aevening where id='$aid'";
$r = myQuery($Query);

echo $r[0][0];

?></td>
          </tr>
          <tr>
            <td class="tdheader">Status :</td>
            <td><?print($status)?></td>
          </tr>
          <tr> 
            <td class="tdheader">First Name : </td>
            <td><?print($first_name)?></td>
          </tr>
          <tr>
            <td class="tdheader">Last Name : </td>
            <td>
              <?print($last_name)?>
            </td>
          </tr>
          <tr>
            <td class="tdheader">Position:</td>
            <td><?print($position)?></td>
          </tr>
          <tr>
            <td class="tdheader">Company:</td>
            <td><?print($company)?></td>
          </tr>
          <tr>
            <td class="tdheader">Company Address: </td>
            <td><?print($c_address)?></td>
          </tr>
          <tr>
            <td class="tdheader">Private Address :</td>
            <td><?print($p_address)?></td>
          </tr>
          <tr>
            <td class="tdheader">Email :</td>
            <td><?print($email)?></td>
          </tr>
          <tr>
            <td class="tdheader">Office Phone :</td>
            <td><?print($o_phone)?></td>
          </tr>
          <tr>
            <td class="tdheader">Mobile Phone :</td>
            <td><?print($m_phone)?></td>
          </tr>
          <tr>
            <td class="tdheader">Home Phone :</td>
            <td><?print($h_phone)?></td>
          </tr>


        </table>
        <p><br>
      </td>

  </tr>
</table>
<br>
<br>
<br>

</form>

<?
require($rela_path . "inc/footer.php");
?>
